Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update triple and some relies version, add consumer registry timeout configuration item #1516

Merged
merged 9 commits into from
Oct 17, 2021

Conversation

LaurenceLiZhixin
Copy link
Contributor

No description provided.

@LaurenceLiZhixin
Copy link
Contributor Author

3.0 Samples is no needs to run time.Sleep() to wait for service discovery, and the max wait time can be configured in consumer level, with api or config file.

@@ -50,7 +48,8 @@ type ConsumerConfig struct {

References map[string]*ReferenceConfig `yaml:"references" json:"references,omitempty" property:"references"`

FilterConf interface{} `yaml:"filter-conf" json:"filter-conf,omitempty" property:"filter-conf"`
FilterConf interface{} `yaml:"filter-conf" json:"filter-conf,omitempty" property:"filter-conf"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.下划线是不是要改横线
2.为什么要添加这个key

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 我改成横线吧
  2. 用来配置客户端的 registry 超时时间

@zhaoyunxing92 zhaoyunxing92 self-requested a review October 12, 2021 09:16
@codecov-commenter
Copy link

codecov-commenter commented Oct 12, 2021

Codecov Report

Merging #1516 (7702e36) into 3.0 (4b1746f) will decrease coverage by 0.09%.
The diff coverage is 31.25%.

Impacted file tree graph

@@            Coverage Diff             @@
##              3.0    #1516      +/-   ##
==========================================
- Coverage   41.86%   41.76%   -0.10%     
==========================================
  Files         259      259              
  Lines       15109    15120      +11     
==========================================
- Hits         6325     6315      -10     
- Misses       8049     8062      +13     
- Partials      735      743       +8     
Impacted Files Coverage Δ
config/config_loader.go 13.23% <ø> (ø)
config/root_config.go 34.37% <0.00%> (-0.66%) ⬇️
config/consumer_config.go 24.74% <22.22%> (-1.11%) ⬇️
metadata/report/delegate/delegate_report.go 26.49% <100.00%> (ø)
remoting/kubernetes/watch.go 76.85% <0.00%> (-3.71%) ⬇️
...tocol/rest/server/server_impl/go_restful_server.go 41.37% <0.00%> (-3.45%) ⬇️
remoting/kubernetes/client.go 69.66% <0.00%> (-2.25%) ⬇️
remoting/kubernetes/registry_controller.go 50.64% <0.00%> (-0.98%) ⬇️
remoting/kubernetes/listener.go 52.83% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4b1746f...7702e36. Read the comment docs.

go.mod Outdated
@@ -11,12 +11,12 @@ require (
github.com/apache/dubbo-go-hessian2 v1.9.3
github.com/creasty/defaults v1.5.2
github.com/dubbogo/go-zookeeper v1.0.3
github.com/dubbogo/gost v1.11.17
github.com/dubbogo/triple v1.0.6-0.20210909153707-3620c8d2d97c
github.com/dubbogo/gost v1.11.18-0.20211011142005-8a95129ef6e2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请打出新版本

@@ -133,12 +133,17 @@ func registerPOJO() {

func (rc *RootConfig) Init() error {
registerPOJO()
if err := rc.Logger.Init(); err != nil {
if err := rc.Logger.Init(); err != nil { // init default logger
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is useless code.

If you init logger after configcenter , and print success info. Then if not success info of config center then init fail.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dependency logic is: config-center's Init procedure relies on default logger, because it would print some logs using default logger. And the user-configed logger relies on config-center's init procedure, to get the logger config from config-center and set the default logger to target logger. So the init logic is

  1. [Init default Logger to avoid NPE if user not configure logger] or [Init user configured logger]
  2. Try to load configuration from config center, to overwrite local configuration
  3. Reload Logger with latest configuration file. The result is also default logger or user configured logger.
    And It's not useless codes. @zouyx

go.mod Outdated
github.com/dubbogo/gost v1.11.17
github.com/dubbogo/triple v1.0.6-0.20210909153707-3620c8d2d97c
github.com/dubbogo/gost v1.11.18-0.20211011142005-8a95129ef6e2
github.com/dubbogo/triple v1.0.7-0.20211012074236-faf8a9baedd6
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use version number pls

@AlexStocks AlexStocks merged commit 0aac960 into 3.0 Oct 17, 2021
@justxuewei justxuewei deleted the update-triple branch August 15, 2022 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants